<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>添加衣服信息</title>	
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="./bootstrap/js/bootstrap.min.js"></script>
<script src="./js/jquery-1.9.1.min.js"></script>
<style type="text/css">
body{
    font-family:微软雅黑;
    background:#F8F8F8;
	}
.font_con{
    color:#296B01;
}
.btn-file {
        position: relative;
        overflow: hidden;
    }
.btn-file input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 999px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    background: red;
    cursor: inherit;
    display: block;
}
.input_ro{
    background-color: white !important;
    cursor: text !important;
}
</style>
<script type="text/javascript">  
$(document).ready(
function()
{
     $("#file").change(function()
     {
            var position = $(this).val();
            var resString = "";
            var flag = position.lastIndexOf("\\") + 1;
            if (flag)
            {
               resString = position.substr(flag); 
            }
            else
            {
                resString = position.substr(position.lastIndexOf("/") + 1);
            }
            $(".input_ro")[0].value = resString;
    });  
}); 
</script>
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
    <h2 class="page-header">
    <small class="font_con">添加商品之</small>衣服信息</h2>
    <form action="addGoodsPro.php?action=add" method="post" class="form-horizontal" enctype="multipart/form-data">
        <div class="control-group">
            <label for="goods_id" class="control-label">商品ID：</label>
            <div class="controls">
                <input type="text" id="goods_id" name="goodsId" placeholder="商品ID">
				<span class="help-inline"><p class="text-warning">为商品分配一个唯一的ID,且为整数</p></span>
            </div>
        </div>

        <div class="control-group">
            <label for="name" class="control-label">商品名称：</label>
            <div class="controls">
                <input type="text" id="name" name="goodsName" placeholder="商品名称">
            </div>
        </div>

        <div class="control-group">
            <label for="price" class="control-label">商品价格：</label>
            <div class="controls">
                <div class="input-append">
                    <input type="text" class="span2" id="price" name="price" placeholder="商品价格">
                    <span class="add-on">&yen;</span>
                </div>
            </div>
        </div>

        <div class="control-group">
            <label for="file" class="control-label">商品图片：</label>
            <div class="controls">
                <div class="input-prepend">
					<span class="btn btn-info btn-file add-on">
						选择图片<input type="file" name="pic" multiple id="file">
					</span>
					<input type="text" readonly class="span3 input_ro" placeholder="支持jpg, gif, png, 不超过500KB">
				</div>
            </div>
        </div>

            <div class="control-group">
               <label class="control-label">衣服数量：</label>
               <div class="controls">
                    <div class="input-prepend input-append">
                        <input type="hidden" name="s165" value="165(M)">
                        <span class="add-on">165(M):</span>
                        <input type="text" class="input-mini" name="MQuantity">
                        <span class="add-on">件</span>
                        <span class="add-on">长度：</span>
                        <input type="text" class="input-mini" name="MLongth">
                        <span class="add-on">cm</span>
                        <span class="add-on">宽度：</span>
                        <input type="text" class="input-mini" name="MWidth">
                        <span class="add-on">cm</span>
                       <br /><br /> 
                        <input type="hidden" name="s170" value="170(L)">
                        <span class="add-on">170(L):</span>
                        <input type="text" class="input-mini" name="LQuantity">
                        <span class="add-on">件</span>
                        <span class="add-on">长度：</span>
                        <input type="text" class="input-mini" name="LLongth">
                        <span class="add-on">cm</span>
                        <span class="add-on">宽度：</span>
                        <input type="text" class="input-mini" name="LWidth">
                        <span class="add-on">cm</span>
    
                       <br /><br /> 
                       <input type="hidden" name="s175" value="175(XL)">
                        <span class="add-on">175(XL):</span>
                        <input type="text" class="input-mini" name="XLQuantity">
                        <span class="add-on">件</span>
                        <span class="add-on">长度：</span>
                        <input type="text" class="input-mini" name="XLLongth">
                        <span class="add-on">cm</span>
                        <span class="add-on">宽度：</span>
                        <input type="text" class="input-mini" name="XLWidth">
                        <span class="add-on">cm</span>

                       <br /><br /> 
                       <input type="hidden" name="s180" value="180(XXL)">
                        <span class="add-on">180(XXL):</span>
                        <input type="text" class="input-mini" name="XXLQuantity">
                        <span class="add-on">件</span>
                        <span class="add-on">长度：</span>
                        <input type="text" class="input-mini" name="XXLLongth">
                        <span class="add-on">cm</span>
                        <span class="add-on">宽度：</span>
                        <input type="text" class="input-mini" name="XXLWidth">
                        <span class="add-on">cm</span>

                       <br /><br /> 
                       <input type="hidden" name="s185" value="185(XXXL)">
                        <span class="add-on">185(XXXL):</span>
                        <input type="text" class="input-mini" name="XXXLQuantity">
                        <span class="add-on">件</span>
                        <span class="add-on">长度：</span>
                        <input type="text" class="input-mini" name="XXXLLongth">
                        <span class="add-on">cm</span>
                        <span class="add-on">宽度：</span>
                        <input type="text" class="input-mini" name="XXXLWidth">
                        <span class="add-on">cm</span>
                    </div>
						<span class="help-block"><p class="text-warning">以上所填必须为整数</p></span>
               </div> 
			   
            </div>
        

        <div class="control-group">
            <label for="desc" class="control-label">商品描述：</label>
            <div class="controls">
                <textarea rows="5" id="desc" name="desc"></textarea> 
            </div>
        </div>
        
     <div class="control-group">
        <div class="controls fontSize">
            <button type="submit" class="btn btn-primary" data-loading-text="添加中...">添加</button>
            <button type="reset" class="btn btn-warning" style="margin-left:10px;">重写</button>
        </div>
    </div>
    </form>
</div>
</body>
</html>
    



